﻿using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace Entity
{
    [Table("wms_knzy_inventory")]
    public class InventoryEntity
    {
        [Key]
        public int inventory_id { get; set; }
        public int warehouse_id { get; set; }

        [MaxLength(50)]
        public string warehouse_code { get; set; }

        [MaxLength(100)]
        public string location { get; set; }

        [MaxLength(50)]
        public string product_code { get; set; }

        public int current_inventory { get; set; } // 当前库存
        public int planned_outgoing_quantity { get; set; } // 计划出库数量
        public int location_id { get; set; }
        public int is_delete { get; set; }
    }

    
    public class ProductListItemDto
    {
        public string product_code { get; set; }
        public string product_name { get; set; }
        // 新增：货品类型名称
        public string product_type_name { get; set; }
        public string specification_model { get; set; }
        public string unit { get; set; }
        public decimal outrefprc { get; set; }
        public int current_stock { get; set; }
        // 新增：调出仓库库存属性
        public int out_warehouse_stock { get; set; }

        // 新增：调入仓库库存属性
        public int in_warehouse_stock { get; set; }
        public decimal stkInrefp { get; set; } // 关键字段：参考单价
    }
    public class ProductSearchParam
    {
        public string Keyword { get; set; }
        public string Unit { get; set; }
        public int PageNum { get; set; } = 1;
        public int PageSize { get; set; } = 10;
        public int? OutWarehouseId { get; set; }   // 可为null（非库存查询场景可不传）
        public int? InWarehouseId { get; set; }    // 可为null
        public string WarehouseName { get; set; } // 新增
    }
    public class PageResult<T>
    {
        public List<T> List { get; set; } = new List<T>();
        public int Total { get; set; }
        public int PageNum { get; set; }
        public int PageSize { get; set; }
        public List<T> Data { get; set; } = new List<T>();
    }

}